﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UFrameWork
{    /// <summary>
    /// 日志级别
    /// </summary>
    public enum ULogLevel
    { 
        Debug  = 0,
        Info   = 1,
        Waring = 2,
        Error  = 3,
    }


    public class ULog
    {
        public static void Info(object message,string tag = "None")
        {
            Write(message, ULogLevel.Info,tag);
        }

        public static void Debug(object message, string tag = "None")
        {
            Write(message, ULogLevel.Debug, tag);
        }

        public static void Waring(object message, string tag = "None")
        {
            Write(message, ULogLevel.Waring, tag);
        }

        public static void Error(object message, string tag = "None")
        {
            Write(message, ULogLevel.Error, tag);
        }

        private static void Write(object message,ULogLevel level,string tag)
        {
            UWork.Do(UEvent.LOG_WRITE, message, level, tag);
        }
    }
}
